class DefaultConfig:
    """默认配置"""
    # mysql配置
    SQLALCHEMY_DATABASE_URI = 'mysql://root:123456@127.0.0.1:3306/headLine'  # 连接地址
    SQLALCHEMY_TRACK_MODIFICATIONS = False  # 是否追踪数据变化
    SQLALCHEMY_ECHO = False  # 是否打印底层执行的SQL

    # redis配置
    # REDIS_HOST = '127.0.0.1'  # ip
    # REDIS_PORT = 6379  # 端口

    STARTUP_NODES = [
        {'host': '127.0.0.1', 'port': '7000'},
        {'host': '127.0.0.1', 'port': '7002'},
        {'host': '127.0.0.1', 'port': '7001'},
    ]

    # jwt
    JWT_SECRET = 'PygJyTBFmkM2wLcD1IrJWJzMfr0j6l/rEcl3JPSCz69J6zeVFsQQMA=='
    JWT_EXPIRE_DAYS = 14  # refresh_JWT过期时间
    JWT_EXPIRE_HOURS = 2  # tenken过期时间

    DEBUG = False

    # CORS_ORIGINS = ['http://127.0.0.1:5000']  # 限定允许访问的域名, 不设置则全部允许

config_dict = {
    'dev': DefaultConfig
}
